<!--        问题处理弹窗-->
<template>
  <el-dialog
    :visible.sync="visible"
    width="80%"
    :before-close="handleClose">
    <el-form ref="model" :model="operation"
             label-width="120px">
      <h1 align="center" color="#409EFF">生产问题处理流程</h1>
      <h2 align="left">标题</h2>
      <!--                    灰色分割线-->
      <el-divider></el-divider>
      <!--                  标题暂无字段-->
      <el-row>
        <el-col :span="12">
          <el-form-item label="标题">
            <el-input v-model="operation.id" :disabled="true"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="单据编号">
            <el-input v-model="operation.fbillno" :disabled="true"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="紧急程度" :disabled="true">
            <el-radio disabled v-model="radio" label="1">正常</el-radio>
            <el-radio disabled v-model="radio" label="2">重要</el-radio>
            <el-radio disabled v-model="radio" label="3">紧急</el-radio>
          </el-form-item>
        </el-col>
      </el-row>
      <h2 align="left">工单明细</h2>
      <!--                    灰色分割线-->
      <el-divider></el-divider>
      <el-row>
        <el-col span="12">
          <el-form-item label="工单编号">
            <el-input v-model="operation.gdbh" :disabled="true"></el-input>
          </el-form-item>
        </el-col>
        <el-col span="12">
          <el-form-item label="销售订单号">
            <el-input v-model="operation.xsddh" :disabled="true"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col span="12">
          <el-form-item label="成品料号">
            <el-input v-model="operation.cplh" :disabled="true"></el-input>
          </el-form-item>
        </el-col>
        <el-col span="12">
          <el-form-item label="产品规格">
            <el-input v-model="operation.cpgg" :disabled="true"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col span="12">
          <el-form-item label="批量">
            <el-input v-model="operation.pl" :disabled="true"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <h2 align="left">问题信息</h2>
      <!--                    灰色分割线-->
      <el-divider></el-divider>
      <el-row>
        <el-col span="12">
          <el-form-item label="提交人">
            <el-input v-model="operation.proposer" :disabled="true"></el-input>
          </el-form-item>
        </el-col>
        <el-col span="12">
          <el-form-item label="提交时间">
            <el-input v-model="operation.begintime" :disabled="true"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col span="12">
          <el-form-item label="处理人">
            <el-input v-model="operation.handler" :disabled="true"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-form-item label="问题描述">
        <el-input type="textarea" v-model="operation.wtms" :disabled="true"></el-input>
      </el-form-item>
      <h2 align="left">问题处理</h2>
      <!--                    灰色分割线-->
      <el-divider></el-divider>
      <el-row>
        <el-col span="12">
          <el-form-item label="问题实施人">
            <el-input v-model="operation.wtssr" :disabled="true"></el-input>
          </el-form-item>
        </el-col>
        <el-col span="12">
          <el-form-item label="问题类型">
            <el-input v-if="operation.lx===0" value="否"
                      :disabled="true">
            </el-input>
            <el-input v-else value="是"
                      :disabled="true">
            </el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col span="12">
          <el-form-item label="是否需要返工">
            <el-input v-if="operation.rework===0" value="软件"
                      :disabled="true">
            </el-input>
            <el-input v-if="operation.rework===1" value="操作"
                      :disabled="true">
            </el-input>
            <el-input v-if="operation.rework===2" value="来料"
                      :disabled="true">
            </el-input>
            <el-input v-if="operation.rework===3" value="工艺"
                      :disabled="true">
            </el-input>
            <el-input v-if="operation.rework===4" value="信息判断"
                      :disabled="true">
            </el-input>
            <el-input v-if="operation.rework===5" value="工作质量"
                      :disabled="true">
            </el-input>
            <el-input v-if="operation.rework===6" value="硬件"
                      :disabled="true">
            </el-input>
            <el-input v-if="operation.rework===7" value="结构"
                      :disabled="true">
            </el-input>
          </el-form-item>
        </el-col>
        <el-col span="12">
          <el-form-item label="品质审核人">
            <el-input v-model="operation.pzshr" :disabled="true"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col span="12">
          <el-form-item label="问题处理时间">
            <el-input v-model="operation.handeltime" :disabled="true"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-form-item label="原因">
        <el-input type="textarea" v-model="operation.reson" :disabled="true"></el-input>
      </el-form-item>
      <h2 align="left">问题结案</h2>
      <!--                    灰色分割线-->
      <el-divider></el-divider>
      <el-row>
        <el-col span="12">
          <el-form-item label="是否关闭问题">
            <el-input v-if="operation.isfinish===0" value="否"
                      :disabled="true">
            </el-input>
            <el-input v-else value="是"
                      :disabled="true">
            </el-input>
          </el-form-item>
        </el-col>
        <el-col span="12">
          <el-form-item label="问题结案时间">
            <el-input v-model="operation.endtime" :disabled="true"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <span slot="footer" class="dialog-footer">
                <el-button type="primary" @click="visible = false">关 闭</el-button>
                </span>
  </el-dialog>
</template>

<script>

export default {
  props: {
    operation: {
      type: Object,
      default: ''
    }
  },
  name: "info",
  data() {
    return {
      //数据库暂无Radio字段
      radio: '1',
      visible: false,
    }
  },
  methods: {
    init() {
      this.visible = true
      console.log(visible)
    },
    handleClose(done) {
      this.$confirm('确认关闭？')
        .then(_ => {
          done();
        })
        .catch(_ => {
        });
    },
  }
}
</script>

<style scoped>

</style>
